//
//  XYmeinfo.m
//  企业信息查询
//
//  Created by 梁中豪 on 16/4/21.
//  Copyright © 2016年 梁中豪. All rights reserved.
//

#import "XYmeinfo.h"
#import <BmobSDK/Bmob.h>

@interface XYmeinfo ()

@end

@implementation XYmeinfo

- (void)viewDidLoad {
    [super viewDidLoad];
    BmobUser *user =[BmobUser getCurrentUser];
    NSString *usr = [user objectForKey:@"username"];
    BmobQuery *query = [BmobQuery queryWithClassName:@"_User"];
    [query whereKey:@"username" equalTo:usr];
    [query findObjectsInBackgroundWithBlock:^(NSArray *array, NSError *error) {
        for (BmobObject *obj in array) {
            if ([obj objectForKey:@"username"]) {
                _zhanghao.text = [obj objectForKey:@"username"];
            }
            if ([obj objectForKey:@"email"]) {
                _email.text = [obj objectForKey:@"email"];
            }

        }
    }];
    
   }

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}



@end
